package com.lesama.file;

/*
    File类的创建方法和删除方法：
        public boolean createNewFile(): 创建文件
        public boolean mkdir(): 创建单级文件夹
        public boolean mkdirs(): 创建多级文件夹
        public boolean delete(): 删除文件/文件夹
 */

import java.io.File;
import java.io.IOException;

public class FileDemo4 {
    public static void main(String[] args) throws IOException {
        File file1 = new File("D:\\my\\java-advanced-codes\\day12\\a.txt");
        File file2 = new File("D:\\my\\java-advanced-codes\\day12\\b.txt");
        File file3 = new File("D:\\my\\java-advanced-codes\\day12\\c\\d\\e");
        File file4 = new File("D:\\my\\java-advanced-codes\\day12\\d.java");
        System.out.println(file1.createNewFile());
        System.out.println(file2.mkdir());
        System.out.println(file3.mkdirs());
        System.out.println(file4.mkdirs());
        System.out.println(file2.delete());
    }
}
